/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GUIChef.java
 *
 * Created on 26-05-2011, 10:08:21
 */

package GuiLayer;
import Controllayer.*;
import Modellayer.*;
import Dblayer.*;
import java.util.ArrayList;
/**
 *
 * @author bruhn
 */
public class GUIChef extends javax.swing.JFrame {
    
    MedarbejderCtr medCtr;
    BestillingCtr besCtr;
    BrugerCtr brugCtr;
    ArbejdsdageCtr arbCtr;
    LeveringCtr levCtr;
    LoenCtr loenCtr;
    VareCtr vareCtr;
    ArrayList<VareLinje> vareLinje;
    /** Creates new form GUIChef */
    public GUIChef() {
        medCtr = new MedarbejderCtr();
        besCtr = new BestillingCtr();
        brugCtr = new BrugerCtr();
        arbCtr = new ArbejdsdageCtr();
        levCtr = new LeveringCtr();
        loenCtr = new LoenCtr();
        vareCtr = new VareCtr();
        vareLinje = new ArrayList<VareLinje>();
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        tbMedNr = new javax.swing.JTextField();
        tbMedFornavn = new javax.swing.JTextField();
        tbMedEfternavn = new javax.swing.JTextField();
        tbMedCpr = new javax.swing.JTextField();
        tbMedAdresse = new javax.swing.JTextField();
        tbMedTlf = new javax.swing.JTextField();
        btnMedOpretMed = new javax.swing.JButton();
        btnMedSletMed = new javax.swing.JButton();
        btnMedFindMed = new javax.swing.JButton();
        btnMedRedigerMed = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        ddLoenFraDag = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        ddLoenFraMaaned = new javax.swing.JComboBox();
        jLabel12 = new javax.swing.JLabel();
        ddLoenFraAar = new javax.swing.JComboBox();
        jLabel13 = new javax.swing.JLabel();
        ddLoenTilAar = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        ddLoenTilMaaned = new javax.swing.JComboBox();
        jLabel15 = new javax.swing.JLabel();
        ddLoenTilDag = new javax.swing.JComboBox();
        jLabel16 = new javax.swing.JLabel();
        btnLoenHentArbejdsdage = new javax.swing.JButton();
        jLabel17 = new javax.swing.JLabel();
        tbLoenSamletTimer = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        tbLoenSamletLoen = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        arbejdsdageList = new javax.swing.JList();
        btnLoenGivLoen = new javax.swing.JButton();
        jLabel51 = new javax.swing.JLabel();
        tbLoenID = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        tbLoginBrugernavn = new javax.swing.JTextField();
        tbLoginKode = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        ddLoginStilling = new javax.swing.JComboBox();
        btnLoginTilfoejLogin = new javax.swing.JButton();
        btnLoginRedigerLogin = new javax.swing.JButton();
        jLabel45 = new javax.swing.JLabel();
        tbLoginBrugerID = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        tbBesBestillingsNr = new javax.swing.JTextField();
        tbBesPris = new javax.swing.JTextField();
        ddBesStatus = new javax.swing.JComboBox();
        jLabel26 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tbBesKommentar = new javax.swing.JTextArea();
        btnOpretBestilling = new javax.swing.JButton();
        btnFindBestilling = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        tbLevEfternavn = new javax.swing.JTextField();
        tbLevFornavn = new javax.swing.JTextField();
        tbLevAdresse = new javax.swing.JTextField();
        tbLevTlf = new javax.swing.JTextField();
        btnOpretLevering = new javax.swing.JButton();
        btnRedigerLevering = new javax.swing.JButton();
        btnFjernLevering = new javax.swing.JButton();
        btnFindLevering = new javax.swing.JButton();
        jLabel31 = new javax.swing.JLabel();
        btnRedigerBestilling = new javax.swing.JButton();
        tbBesVareID = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        btnTilfoejVare = new javax.swing.JButton();
        jLabel33 = new javax.swing.JLabel();
        btnPrintKvittering = new javax.swing.JButton();
        tbBesFjernVare = new javax.swing.JButton();
        jLabel48 = new javax.swing.JLabel();
        tbBesAntal = new javax.swing.JTextField();
        jLabel50 = new javax.swing.JLabel();
        tbBesMedNr = new javax.swing.JTextField();
        jScrollPane5 = new javax.swing.JScrollPane();
        vareList = new javax.swing.JList();
        jScrollPane6 = new javax.swing.JScrollPane();
        tbBesKvittering = new javax.swing.JTextArea();
        jPanel4 = new javax.swing.JPanel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        ddArbDag = new javax.swing.JComboBox();
        jLabel36 = new javax.swing.JLabel();
        ddArbAften = new javax.swing.JComboBox();
        jLabel37 = new javax.swing.JLabel();
        ddArbWeekend = new javax.swing.JComboBox();
        jLabel38 = new javax.swing.JLabel();
        tbArbID = new javax.swing.JTextField();
        btnTilfoejArbejdsdag = new javax.swing.JButton();
        jLabel39 = new javax.swing.JLabel();
        ddArbMaaned = new javax.swing.JComboBox();
        jLabel40 = new javax.swing.JLabel();
        ddArbAar = new javax.swing.JComboBox();
        jLabel46 = new javax.swing.JLabel();
        tbArbTimer = new javax.swing.JTextField();
        jLabel47 = new javax.swing.JLabel();
        tbArbMedNr = new javax.swing.JTextField();
        jLabel49 = new javax.swing.JLabel();
        tbArbLoen = new javax.swing.JTextField();
        btnArbUdregnLoen = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        tbVareID = new javax.swing.JTextField();
        tbVareNavn = new javax.swing.JTextField();
        tbVarePris = new javax.swing.JTextField();
        tbVareBeskrivelse = new javax.swing.JTextField();
        btnSletVare = new javax.swing.JButton();
        btnOpretVare1 = new javax.swing.JButton();
        btnFindVare = new javax.swing.JButton();
        btnRedigerVare = new javax.swing.JButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        tbVareMenuKort = new javax.swing.JTextArea();
        btnVarePrintMenukort = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jTabbedPane1.setPreferredSize(new java.awt.Dimension(855, 328));

        jLabel1.setText("Med Nr:");

        jLabel2.setText("Fornavn:");

        jLabel3.setText("Efternavn:");

        jLabel4.setText("Cpr:");

        jLabel5.setText("Adresse:");

        jLabel6.setText("Tlf:");

        btnMedOpretMed.setText("Opret Med.");
        btnMedOpretMed.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMedOpretMedActionPerformed(evt);
            }
        });

        btnMedSletMed.setText("Slet Med.");
        btnMedSletMed.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMedSletMedActionPerformed(evt);
            }
        });

        btnMedFindMed.setText("Find Med.");
        btnMedFindMed.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMedFindMedActionPerformed(evt);
            }
        });

        btnMedRedigerMed.setText("Rediger Med.");
        btnMedRedigerMed.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMedRedigerMedActionPerformed(evt);
            }
        });

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel7.setText("Medarbejder:");

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel8.setText("Giv Løn:");

        jLabel9.setText("Fra Dato:");

        jLabel10.setText("Dag: ");

        ddLoenFraDag.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));

        jLabel11.setText("Måned:");

        ddLoenFraMaaned.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));

        jLabel12.setText("År:");

        ddLoenFraAar.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99" }));

        jLabel13.setText("Til Dato:");

        ddLoenTilAar.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99" }));

        jLabel14.setText("År:");

        ddLoenTilMaaned.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));

        jLabel15.setText("Måned:");

        ddLoenTilDag.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));

        jLabel16.setText("Dag: ");

        btnLoenHentArbejdsdage.setText("Hent Arbejdsdage");
        btnLoenHentArbejdsdage.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLoenHentArbejdsdageActionPerformed(evt);
            }
        });

        jLabel17.setText("Samlet Timer:");

        jLabel18.setText("Samlet Løn:");

        jScrollPane1.setViewportView(arbejdsdageList);

        btnLoenGivLoen.setText("Giv Løn");
        btnLoenGivLoen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLoenGivLoenActionPerformed(evt);
            }
        });

        jLabel51.setText("Løn ID:");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel51)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tbLoenID, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)
                        .addComponent(btnLoenGivLoen))
                    .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnLoenHentArbejdsdage, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel10)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(ddLoenFraDag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(10, 10, 10)
                                        .addComponent(jLabel11)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(ddLoenFraMaaned, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jLabel12))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                .addComponent(jLabel17)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(tbLoenSamletTimer))
                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                                .addComponent(jLabel16)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addComponent(ddLoenTilDag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGap(10, 10, 10)
                                                .addComponent(jLabel15)))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel18)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addComponent(ddLoenTilMaaned, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                                .addComponent(jLabel14)))))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(ddLoenTilAar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(ddLoenFraAar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(tbLoenSamletLoen, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE)))
                            .addComponent(jScrollPane1))
                        .addGap(6, 6, 6)))
                .addContainerGap(82, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(ddLoenFraDag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addComponent(ddLoenFraMaaned, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12)
                    .addComponent(ddLoenFraAar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel13)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(ddLoenTilDag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15)
                    .addComponent(ddLoenTilMaaned, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14)
                    .addComponent(ddLoenTilAar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnLoenHentArbejdsdage)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(tbLoenSamletTimer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18)
                    .addComponent(tbLoenSamletLoen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnLoenGivLoen)
                    .addComponent(jLabel51)
                    .addComponent(tbLoenID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(193, Short.MAX_VALUE))
        );

        jLabel19.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel19.setText("Login:");

        jLabel20.setText("Brugernavn:");

        jLabel21.setText("Kodeord:");

        jLabel22.setText("Stilling:");

        ddLoginStilling.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "true", "false" }));

        btnLoginTilfoejLogin.setText("Tilføj Login");
        btnLoginTilfoejLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLoginTilfoejLoginActionPerformed(evt);
            }
        });

        btnLoginRedigerLogin.setText("Rediger Login");
        btnLoginRedigerLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLoginRedigerLoginActionPerformed(evt);
            }
        });

        jLabel45.setText("Bruger ID:");

        tbLoginBrugerID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbLoginBrugerIDActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(btnLoginTilfoejLogin)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnLoginRedigerLogin))
                    .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel21)
                            .addComponent(jLabel20)
                            .addComponent(jLabel22)
                            .addComponent(jLabel45))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(tbLoginBrugerID)
                            .addComponent(tbLoginBrugernavn, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)
                            .addComponent(tbLoginKode, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)
                            .addComponent(ddLoginStilling, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, Short.MAX_VALUE)))
                .addGap(35, 35, 35))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel19))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(tbLoginBrugerID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel45))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(tbLoginBrugernavn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(tbLoginKode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(ddLoginStilling, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(66, 66, 66)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnLoginRedigerLogin)
                    .addComponent(btnLoginTilfoejLogin))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addGap(114, 114, 114))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(btnMedFindMed, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnMedOpretMed, javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnMedRedigerMed, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
                            .addComponent(btnMedSletMed, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel1)
                            .addComponent(jLabel6)
                            .addComponent(jLabel5)
                            .addComponent(jLabel3)
                            .addComponent(jLabel4))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(tbMedCpr, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)
                            .addComponent(tbMedTlf, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)
                            .addComponent(tbMedAdresse, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)
                            .addComponent(tbMedEfternavn, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)
                            .addComponent(tbMedNr, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)
                            .addComponent(tbMedFornavn, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE))))
                .addGap(34, 34, 34)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(8, 8, 8)
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(tbMedNr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(tbMedFornavn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(tbMedEfternavn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(tbMedCpr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(tbMedAdresse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(tbMedTlf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnMedOpretMed)
                            .addComponent(btnMedSletMed))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnMedFindMed)
                            .addComponent(btnMedRedigerMed)))
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 491, Short.MAX_VALUE))
                .addContainerGap())
        );

        jTabbedPane1.addTab("Medarbejder", jPanel2);

        jLabel23.setText("Bestillings Nr:");

        jLabel24.setText("Status:");

        jLabel25.setText("Pris:");

        tbBesBestillingsNr.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbBesBestillingsNrActionPerformed(evt);
            }
        });

        tbBesPris.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbBesPrisActionPerformed(evt);
            }
        });

        ddBesStatus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "false", "true" }));
        ddBesStatus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ddBesStatusActionPerformed(evt);
            }
        });

        jLabel26.setText("Kommentar:");

        tbBesKommentar.setColumns(20);
        tbBesKommentar.setRows(5);
        jScrollPane2.setViewportView(tbBesKommentar);

        btnOpretBestilling.setText("Opret Bestilling");
        btnOpretBestilling.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOpretBestillingActionPerformed(evt);
            }
        });

        btnFindBestilling.setText("Find Bestilling");
        btnFindBestilling.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFindBestillingActionPerformed(evt);
            }
        });

        jLabel27.setText("Fornavn:");

        jLabel28.setText("Efternavn:");

        jLabel29.setText("Adresse:");

        jLabel30.setText("Tlf:");

        tbLevEfternavn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbLevEfternavnActionPerformed(evt);
            }
        });

        tbLevFornavn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbLevFornavnActionPerformed(evt);
            }
        });

        tbLevAdresse.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbLevAdresseActionPerformed(evt);
            }
        });

        tbLevTlf.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbLevTlfActionPerformed(evt);
            }
        });

        btnOpretLevering.setText("Opret Levering");
        btnOpretLevering.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOpretLeveringActionPerformed(evt);
            }
        });

        btnRedigerLevering.setText("Rediger Levering");
        btnRedigerLevering.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRedigerLeveringActionPerformed(evt);
            }
        });

        btnFjernLevering.setText("Fjern Levering");
        btnFjernLevering.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFjernLeveringActionPerformed(evt);
            }
        });

        btnFindLevering.setText("Find Levering");
        btnFindLevering.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFindLeveringActionPerformed(evt);
            }
        });

        jLabel31.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel31.setText("Levering:");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnFindLevering)
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel28)
                                    .addComponent(jLabel27)
                                    .addComponent(jLabel29)
                                    .addComponent(jLabel30))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(tbLevTlf, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(tbLevAdresse, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(tbLevFornavn, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(tbLevEfternavn, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(btnOpretLevering))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnFjernLevering)
                            .addComponent(btnRedigerLevering))
                        .addGap(98, 98, 98))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel31)
                        .addContainerGap(314, Short.MAX_VALUE))))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(jLabel31)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel27)
                    .addComponent(tbLevFornavn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tbLevEfternavn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel28)
                        .addGap(14, 14, 14)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel29)
                            .addComponent(tbLevAdresse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel30)
                            .addComponent(tbLevTlf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnOpretLevering)
                    .addComponent(btnFjernLevering))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnFindLevering)
                    .addComponent(btnRedigerLevering))
                .addGap(19, 19, 19))
        );

        btnRedigerBestilling.setText("Rediger Bestilling");
        btnRedigerBestilling.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRedigerBestillingActionPerformed(evt);
            }
        });

        tbBesVareID.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbBesVareIDActionPerformed(evt);
            }
        });

        jLabel32.setText("Vare Nr:");

        btnTilfoejVare.setText("Tilføj Vare");
        btnTilfoejVare.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTilfoejVareActionPerformed(evt);
            }
        });

        jLabel33.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel33.setText("Bestilling:");

        btnPrintKvittering.setText("Print Kvittering");
        btnPrintKvittering.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPrintKvitteringActionPerformed(evt);
            }
        });

        tbBesFjernVare.setText("Fjern Vare");
        tbBesFjernVare.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbBesFjernVareActionPerformed(evt);
            }
        });

        jLabel48.setText("Antal:");

        tbBesAntal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbBesAntalActionPerformed(evt);
            }
        });

        jLabel50.setText("Med Nr:");

        tbBesMedNr.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbBesMedNrActionPerformed(evt);
            }
        });

        jScrollPane5.setViewportView(vareList);

        tbBesKvittering.setColumns(20);
        tbBesKvittering.setRows(5);
        jScrollPane6.setViewportView(tbBesKvittering);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addComponent(btnFindBestilling)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnOpretBestilling)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btnRedigerBestilling)
                                .addGap(18, 18, 18)
                                .addComponent(btnPrintKvittering))
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addComponent(jLabel26)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel23)
                                            .addComponent(jLabel25)
                                            .addComponent(jLabel24)
                                            .addComponent(jLabel33))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(ddBesStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(tbBesBestillingsNr, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(tbBesPris, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 72, Short.MAX_VALUE)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addComponent(jLabel50)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(tbBesMedNr, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel32)
                                            .addComponent(jLabel48))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(tbBesAntal, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(tbBesVareID, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGroup(jPanel5Layout.createSequentialGroup()
                                            .addComponent(btnTilfoejVare)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(tbBesFjernVare)))))))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGap(38, 38, 38)
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 443, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(82, 82, 82)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGap(7, 7, 7)
                                .addComponent(jLabel33)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel23)
                                    .addComponent(tbBesBestillingsNr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(13, 13, 13)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel25)
                                    .addComponent(tbBesPris, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel24)
                                    .addComponent(ddBesStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel26)
                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel50)
                                    .addComponent(tbBesMedNr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel48)
                                    .addComponent(tbBesAntal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel32)
                                    .addComponent(tbBesVareID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(btnTilfoejVare)
                                    .addComponent(tbBesFjernVare))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnOpretBestilling)
                            .addComponent(btnFindBestilling)
                            .addComponent(btnRedigerBestilling)
                            .addComponent(btnPrintKvittering))
                        .addGap(53, 53, 53)
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(19, 19, 19))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(156, 156, 156))))
        );

        jTabbedPane1.addTab("Bestilling/Levering", jPanel5);

        jLabel34.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel34.setText("Dato:");

        jLabel35.setText("Dag:");

        ddArbDag.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
        ddArbDag.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ddArbDagActionPerformed(evt);
            }
        });

        jLabel36.setText("Aften:");

        ddArbAften.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "true", "false" }));
        ddArbAften.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ddArbAftenActionPerformed(evt);
            }
        });

        jLabel37.setText("Weekend:");

        ddArbWeekend.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "true", "false" }));
        ddArbWeekend.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ddArbWeekendActionPerformed(evt);
            }
        });

        jLabel38.setText("Timer:");

        btnTilfoejArbejdsdag.setText("Tilføj Arbejdsdag");
        btnTilfoejArbejdsdag.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnTilfoejArbejdsdagActionPerformed(evt);
            }
        });

        jLabel39.setText("Måned:");

        ddArbMaaned.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
        ddArbMaaned.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ddArbMaanedActionPerformed(evt);
            }
        });

        jLabel40.setText("År:");

        ddArbAar.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99" }));
        ddArbAar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ddArbAarActionPerformed(evt);
            }
        });

        jLabel46.setText("ArbID:");

        jLabel47.setText("MedNr:");

        jLabel49.setText("Løn:");

        btnArbUdregnLoen.setText("Udregn Løn");
        btnArbUdregnLoen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnArbUdregnLoenActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(btnTilfoejArbejdsdag)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnArbUdregnLoen))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel46)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tbArbID, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel38)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tbArbTimer, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel37)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ddArbWeekend, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel36)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ddArbAften, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel35)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(ddArbDag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jLabel39)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ddArbMaaned, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel40)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(ddArbAar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel34)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel4Layout.createSequentialGroup()
                            .addComponent(jLabel49)
                            .addGap(18, 18, 18)
                            .addComponent(tbArbLoen, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel4Layout.createSequentialGroup()
                            .addComponent(jLabel47)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(tbArbMedNr, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(708, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(43, 43, 43)
                .addComponent(jLabel34)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel35)
                    .addComponent(ddArbDag, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ddArbAar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ddArbMaaned, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(jLabel40))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(ddArbAften, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(ddArbWeekend, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38)
                    .addComponent(tbArbTimer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel46)
                    .addComponent(tbArbID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel47)
                    .addComponent(tbArbMedNr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel49)
                    .addComponent(tbArbLoen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnTilfoejArbejdsdag)
                    .addComponent(btnArbUdregnLoen))
                .addContainerGap(199, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Arbejdsdage", jPanel4);

        jLabel41.setText("Varenavn:");

        jLabel42.setText("Vare id:");

        jLabel43.setText("Pris:");

        jLabel44.setText("Beskrivelse:");

        btnSletVare.setText("Slet Vare");
        btnSletVare.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSletVareActionPerformed(evt);
            }
        });

        btnOpretVare1.setText("Opret Vare");
        btnOpretVare1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOpretVare1ActionPerformed(evt);
            }
        });

        btnFindVare.setText("Find Vare");
        btnFindVare.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFindVareActionPerformed(evt);
            }
        });

        btnRedigerVare.setText("Rediger Vare");
        btnRedigerVare.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRedigerVareActionPerformed(evt);
            }
        });

        tbVareMenuKort.setColumns(20);
        tbVareMenuKort.setRows(5);
        jScrollPane3.setViewportView(tbVareMenuKort);

        btnVarePrintMenukort.setText("Print Menukort");
        btnVarePrintMenukort.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVarePrintMenukortActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(85, 85, 85)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 630, Short.MAX_VALUE)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel42)
                                .addGap(55, 55, 55)
                                .addComponent(tbVareID, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(38, 38, 38)
                                .addComponent(jLabel43)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 70, Short.MAX_VALUE)
                                .addComponent(tbVarePris, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel41)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tbVareNavn, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(38, 38, 38)
                                .addComponent(jLabel44)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(tbVareBeskrivelse, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(35, 35, 35)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnSletVare, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)
                            .addComponent(btnVarePrintMenukort, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)
                            .addComponent(btnOpretVare1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnRedigerVare, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)
                            .addComponent(btnFindVare, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE))))
                .addGap(239, 239, 239))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(16, 16, 16)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel42)
                            .addComponent(jLabel43)
                            .addComponent(tbVareID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tbVarePris, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnOpretVare1)
                            .addComponent(btnFindVare))
                        .addGap(3, 3, 3)
                        .addComponent(btnVarePrintMenukort)))
                .addGap(4, 4, 4)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSletVare)
                    .addComponent(btnRedigerVare)
                    .addComponent(jLabel41)
                    .addComponent(jLabel44)
                    .addComponent(tbVareNavn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tbVareBeskrivelse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(21, 21, 21)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(212, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Vare", jPanel8);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 959, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 530, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tbBesVareIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbBesVareIDActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tbBesVareIDActionPerformed

    private void btnFindLeveringActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFindLeveringActionPerformed
        Levering levObj = levCtr.findLevering(Integer.parseInt(tbBesBestillingsNr.getText()), false);
        tbLevFornavn.setText(levObj.getFornavn());
        tbLevEfternavn.setText(levObj.getEfternavn());
        tbLevAdresse.setText(levObj.getAdresse());
        tbLevTlf.setText(Integer.toString(levObj.getTlf()));
}//GEN-LAST:event_btnFindLeveringActionPerformed

    private void btnFjernLeveringActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFjernLeveringActionPerformed
        levCtr.deleteLevering(Integer.parseInt(tbBesBestillingsNr.getText()));
}//GEN-LAST:event_btnFjernLeveringActionPerformed

    private void btnRedigerLeveringActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRedigerLeveringActionPerformed
        Levering levering = levCtr.findLevering(Integer.parseInt(tbBesBestillingsNr.getText()), false);
        String fornavn = tbLevFornavn.getText();
        String efternavn = tbLevEfternavn.getText();
        String adresse = tbLevAdresse.getText();
        int tlf = Integer.parseInt(tbLevTlf.getText());
        int bestillingsNr = Integer.parseInt(tbBesBestillingsNr.getText());
        levCtr.redigerLevering(adresse, fornavn, efternavn, tlf, bestillingsNr);
}//GEN-LAST:event_btnRedigerLeveringActionPerformed

    private void btnOpretLeveringActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOpretLeveringActionPerformed
        Levering levObj = new Levering();
        Bestilling besObj = new Bestilling();
        levObj.setFornavn(tbLevFornavn.getText());
        levObj.setEfternavn(tbLevEfternavn.getText());
        levObj.setAdresse(tbLevAdresse.getText());
        levObj.setTlf(Integer.parseInt(tbLevTlf.getText()));
        besObj.setBestillingsNr(Integer.parseInt(tbBesBestillingsNr.getText()));
        levObj.setBestillingsNr(besObj);
        levCtr.opretLevering(levObj);
}//GEN-LAST:event_btnOpretLeveringActionPerformed

    private void tbLevTlfActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbLevTlfActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tbLevTlfActionPerformed

    private void tbLevAdresseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbLevAdresseActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tbLevAdresseActionPerformed

    private void tbLevFornavnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbLevFornavnActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tbLevFornavnActionPerformed

    private void tbLevEfternavnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbLevEfternavnActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tbLevEfternavnActionPerformed

    private void btnOpretBestillingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOpretBestillingActionPerformed
        Bestilling besObj = new Bestilling();
        Medarbejder arbObj = new Medarbejder();
        besObj.setBestillingsNr(Integer.parseInt(tbBesBestillingsNr.getText()));
        besObj.setPris(Double.parseDouble(tbBesPris.getText()));
        besObj.setKommentar(tbBesKommentar.getText());
        besObj.setStatus(Boolean.parseBoolean(ddBesStatus.getSelectedItem().toString()));
        arbObj.setMedNr(Integer.parseInt(tbBesMedNr.getText()));
        besObj.setMedNr(arbObj);
        besCtr.opretBestilling(besObj);
}//GEN-LAST:event_btnOpretBestillingActionPerformed

    private void ddBesStatusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ddBesStatusActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_ddBesStatusActionPerformed

    private void tbBesPrisActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbBesPrisActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tbBesPrisActionPerformed

    private void tbBesBestillingsNrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbBesBestillingsNrActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_tbBesBestillingsNrActionPerformed

    private void ddArbDagActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ddArbDagActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_ddArbDagActionPerformed

    private void ddArbAftenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ddArbAftenActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_ddArbAftenActionPerformed

    private void ddArbWeekendActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ddArbWeekendActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_ddArbWeekendActionPerformed

    private void ddArbMaanedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ddArbMaanedActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_ddArbMaanedActionPerformed

    private void ddArbAarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ddArbAarActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_ddArbAarActionPerformed

    private void btnMedOpretMedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMedOpretMedActionPerformed
        Medarbejder medObj = new Medarbejder();
        medObj.setMedNr(Integer.parseInt(tbMedNr.getText()));
        medObj.setFornavn(tbMedFornavn.getText());
        medObj.setEfternavn(tbMedEfternavn.getText());
        medObj.setAdresse(tbMedAdresse.getText());
        medObj.setCpr(Integer.parseInt(tbMedCpr.getText()));
        medObj.setTlf(Integer.parseInt(tbMedTlf.getText()));
        medCtr.opretMedarbejder(medObj);
    }//GEN-LAST:event_btnMedOpretMedActionPerformed

    private void btnMedRedigerMedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMedRedigerMedActionPerformed
       Medarbejder medarbejder = medCtr.findMedarbejder(Integer.parseInt(tbMedNr.getText()));
       int medNr = Integer.parseInt(tbMedNr.getText());
       String fornavn = tbMedFornavn.getText();
       String efternavn = tbMedEfternavn.getText();
       String adresse = tbMedAdresse.getText();
       int cpr = Integer.parseInt(tbMedCpr.getText());
       int tlf = Integer.parseInt(tbMedTlf.getText());
       medCtr.redigerMedarbejder(medNr, fornavn, efternavn, cpr, adresse, tlf);
    }//GEN-LAST:event_btnMedRedigerMedActionPerformed

    private void btnMedFindMedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMedFindMedActionPerformed
        Medarbejder medObj = medCtr.findMedarbejder(Integer.parseInt(tbMedNr.getText()));
        tbMedFornavn.setText(medObj.getFornavn());
        tbMedEfternavn.setText(medObj.getEfternavn());
        tbMedAdresse.setText(medObj.getAdresse());
        tbMedCpr.setText(Integer.toString(medObj.getCpr()));
        tbMedTlf.setText(Integer.toString(medObj.getTlf()));
    }//GEN-LAST:event_btnMedFindMedActionPerformed

    private void btnMedSletMedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMedSletMedActionPerformed
        medCtr.sletMedarbejder(Integer.parseInt(tbMedNr.getText()));
    }//GEN-LAST:event_btnMedSletMedActionPerformed

    private void btnLoginTilfoejLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginTilfoejLoginActionPerformed
        //Medarbejder medarbejder = medCtr.findMedarbejder(Integer.parseInt(tbMedNr.getText()));
        Bruger brugObj = new Bruger();
        Medarbejder medObj = new Medarbejder();
        brugObj.setBrugerID(Integer.parseInt(tbLoginBrugerID.getText()));
        brugObj.setBrugerNavn(tbLoginBrugernavn.getText());
        medObj.setMedNr(Integer.parseInt(tbMedNr.getText()));
        brugObj.setMedNr(medObj);
        brugObj.setKode(tbLoginKode.getText());
        brugObj.setStilling(Boolean.parseBoolean(ddLoginStilling.getSelectedItem().toString()));
        brugCtr.opretBruger(brugObj);
    }//GEN-LAST:event_btnLoginTilfoejLoginActionPerformed

    private void btnOpretVare1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOpretVare1ActionPerformed
        Vare vareObj = new Vare();
        vareObj.setVareID(Integer.parseInt(tbVareID.getText()));
        vareObj.setVareNavn(tbVareNavn.getText());
        vareObj.setBeskrivelse(tbVareBeskrivelse.getText());
        vareObj.setPris(Double.parseDouble(tbVarePris.getText()));
        vareCtr.opretVare(vareObj);
    }//GEN-LAST:event_btnOpretVare1ActionPerformed

    private void btnSletVareActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSletVareActionPerformed
        vareCtr.sletVare(Integer.parseInt(tbVareID.getText()));
    }//GEN-LAST:event_btnSletVareActionPerformed

    private void btnFindVareActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFindVareActionPerformed
        Vare vareObj = vareCtr.findVare(Integer.parseInt(tbVareID.getText()), false);
        tbVareID.setText(Integer.toString(vareObj.getVareID()));
        tbVareNavn.setText(vareObj.getVareNavn());
        tbVareBeskrivelse.setText(vareObj.getBeskrivelse());
        tbVarePris.setText(Double.toString(vareObj.getPris()));
    }//GEN-LAST:event_btnFindVareActionPerformed

    private void btnRedigerVareActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRedigerVareActionPerformed
       Vare vare = vareCtr.findVare(Integer.parseInt(tbVareID.getText()), false);
       int vareID = Integer.parseInt(tbVareID.getText());
       String vareNavn = tbVareNavn.getText();
       String beskrivelse = tbVareBeskrivelse.getText();
       double pris = Double.parseDouble(tbVarePris.getText());
       vareCtr.redigerVare(beskrivelse, vareNavn, vareID, pris);
    }//GEN-LAST:event_btnRedigerVareActionPerformed

    private void btnLoginRedigerLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginRedigerLoginActionPerformed
        Bruger bruger = brugCtr.findBruger(Integer.parseInt(tbLoginBrugerID.getText()), false);
        int brugerID = Integer.parseInt(tbLoginBrugerID.getText());
        String brugernavn = tbLoginBrugernavn.getText();
        String kodeord = tbLoginKode.getText();
        Boolean stilling = Boolean.parseBoolean(ddLoginStilling.getSelectedItem().toString());
        brugCtr.redigerBruger(kodeord, brugernavn, stilling, brugerID);
    }//GEN-LAST:event_btnLoginRedigerLoginActionPerformed

    private void tbLoginBrugerIDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbLoginBrugerIDActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tbLoginBrugerIDActionPerformed

    private void btnTilfoejArbejdsdagActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTilfoejArbejdsdagActionPerformed
        ArbejdsDage arbObj = new ArbejdsDage();
        Medarbejder medObj = new Medarbejder();
        arbObj.setAften(Boolean.parseBoolean(ddArbAften.getSelectedItem().toString()));
        arbObj.setWeekend(Boolean.parseBoolean(ddArbWeekend.getSelectedItem().toString()));
        arbObj.setTimer(Integer.parseInt(tbArbID.getText()));
        arbObj.setDato(ddArbDag.getSelectedItem().toString() + '/' + ddArbMaaned.getSelectedItem().toString() + '/' + ddArbAar.getSelectedItem().toString());
        medObj.setMedNr(Integer.parseInt(tbArbMedNr.getText()));
        arbObj.setMedNr(medObj);
        arbObj.setLoen(Double.parseDouble(tbArbLoen.getText()));
        arbCtr.opretArbejdsdage(arbObj);
    }//GEN-LAST:event_btnTilfoejArbejdsdagActionPerformed

    private void btnRedigerBestillingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRedigerBestillingActionPerformed
        Bestilling bestilling = besCtr.findBestilling(Integer.parseInt(tbBesBestillingsNr.getText()), false);
        int bestillingsNr = Integer.parseInt(tbBesBestillingsNr.getText());
        String kommentar = tbBesKommentar.getText();
        double pris = Double.parseDouble(tbBesPris.getText());
        boolean status = Boolean.parseBoolean(ddBesStatus.getSelectedItem().toString());
        int medNr = Integer.parseInt(tbBesMedNr.getText());
        besCtr.redigerBestilling(bestillingsNr, kommentar, pris, status, medNr);
    }//GEN-LAST:event_btnRedigerBestillingActionPerformed

    private void btnFindBestillingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFindBestillingActionPerformed
        Bestilling besObj = besCtr.findBestilling(Integer.parseInt(tbBesBestillingsNr.getText()), false);
        tbBesBestillingsNr.setText(Integer.toString(besObj.getBestillingsNr()));
        tbBesPris.setText(Double.toString(besObj.getPris()));
        ddBesStatus.setSelectedItem(besObj.isStatus());
        tbBesKommentar.setText(besObj.getKommentar());
        int bestillingsNr = Integer.parseInt(tbBesBestillingsNr.getText());
        ArrayList<VareLinje> varLinje = besCtr.findVareLinjeMedBestillingsNr(bestillingsNr);
        int i = 0;
		while(i < varLinje.size())
        {
        System.out.println("varelinje list 1: "+varLinje.get(i));
        buildList(varLinje);
        System.out.println("vareLinje list 3 "+varLinje.get(i));
        i++;
        }
    }//GEN-LAST:event_btnFindBestillingActionPerformed

       private void buildList(ArrayList<VareLinje> vareLinje)
                 {
                    String[] projects = new String[vareLinje.size()];
                    int index = 0;
                    System.out.println("vareLinje list 2: "+vareLinje);
                    for(VareLinje wobj : vareLinje)
                    {

                        //String name = wobj.getProduct().getName();
                        String vareNavn = wobj.getVareID().getVareNavn();
                        int antal = wobj.getAntal();
                        System.out.println("varenavn 1: "+ wobj.getVareID().getVareNavn());
                        System.out.println("vare antal"+ wobj.getAntal());
//                        if(name.length() < 15){
//                            int length = name.length();
//                            while (length < 20)
//                            {
//                              name = name + "  ";
//                              length++;
//                            }
//                         }
                         projects[index] =(vareNavn + "   " + wobj.getAntal());
                         index++;
                    }
                    vareList.setListData(projects);
                }
       private void buildListArb(ArrayList<ArbejdsDage> arb)
         {
            String[] projects = new String[arb.size()];
            int index = 0;
            System.out.println("arbejdsdage list 2: "+arb);
            for(ArbejdsDage wobj : arb)
            {

                //String name = wobj.getProduct().getName();
                String dato = wobj.getDato();
                int timer = wobj.getTimer();
                double loen = wobj.getLoen();
                System.out.println("arbejdsdage dato: "+ wobj.getDato());
                System.out.println("arbejdsdage timer"+ wobj.getTimer());
                System.out.println("arbejdsdage loen"+ wobj.getLoen());
//                        if(name.length() < 15){
//                            int length = name.length();
//                            while (length < 20)
//                            {
//                              name = name + "  ";
//                              length++;
//                            }
//                         }
                 projects[index] =(dato + "   " + wobj.getTimer() + "   " + wobj.getLoen());
                 index++;
            }
            arbejdsdageList.setListData(projects);
        }
    private void btnTilfoejVareActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTilfoejVareActionPerformed
        VareLinje varlObj = new VareLinje();
        Vare vareObj = new Vare();
        Bestilling besObj = new Bestilling();
        vareObj.setVareID(Integer.parseInt(tbBesVareID.getText()));
        varlObj.setVareID(vareObj);
        varlObj.setAntal(Integer.parseInt(tbBesAntal.getText()));
        besObj.setBestillingsNr(Integer.parseInt(tbBesBestillingsNr.getText()));
        varlObj.setBestillingsNr(besObj);
        besCtr.opretVareLinje(varlObj);
    }//GEN-LAST:event_btnTilfoejVareActionPerformed

    private void tbBesAntalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbBesAntalActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tbBesAntalActionPerformed

    private void tbBesFjernVareActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbBesFjernVareActionPerformed
        besCtr.sletVareLinje(Integer.parseInt(tbBesVareID.getText()), Integer.parseInt(tbBesBestillingsNr.getText()));
    }//GEN-LAST:event_tbBesFjernVareActionPerformed

    private void btnLoenHentArbejdsdageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoenHentArbejdsdageActionPerformed
        ArbejdsDage arbObj = new ArbejdsDage();
		Loen loenObj = new Loen();
//        int dagDato = Integer.parseInt(arbObj.getDato().substring(0, 2));
//        int maanedDato = Integer.parseInt(arbObj.getDato().substring(3, 5));
//        int aarDato = Integer.parseInt(arbObj.getDato().substring(6, 8));

//          String fraDag = (String)ddLoenFraDag.getSelectedItem();
//        int fraDag1 = Integer.parseInt(fraDag);
//          String tilDag = (String)ddLoenTilDag.getSelectedItem();
//        int tilDag1 = Integer.parseInt(tilDag);
//
//          String fraMaaned = (String)ddLoenFraMaaned.getSelectedItem();
//        int fraMaaned1 = Integer.parseInt(fraMaaned);
//          String tilMaaned = (String)ddLoenTilMaaned.getSelectedItem();
//        int tilMaaned1 = Integer.parseInt(tilMaaned);
//
//        String fraAar = (String)ddLoenFraAar.getSelectedItem();
//        int fraAar1 = Integer.parseInt(fraAar);
//        String tilAar = (String)ddLoenTilAar.getSelectedItem();
//        int tilAar1 = Integer.parseInt(tilAar);
        String fraDato = (String)ddLoenFraDag.getSelectedItem() + '/' + (String)ddLoenFraMaaned.getSelectedItem() + '/' + (String)ddLoenFraAar.getSelectedItem();
        String tilDato = (String)ddLoenTilDag.getSelectedItem() + '/' + (String)ddLoenTilMaaned.getSelectedItem() + '/' + (String)ddLoenTilAar.getSelectedItem();
        arbCtr.ArbejdsdageSortering(fraDato, tilDato, Integer.parseInt(tbMedNr.getText()));
        int medNr = Integer.parseInt(tbMedNr.getText());
		ArrayList<ArbejdsDage> arbLinje = arbCtr.ArbejdsdageSortering(fraDato, tilDato, medNr);

		int i = 0;
		while(i < arbLinje.size())
        {
            System.out.println("varelinje list 1: "+arbLinje.get(i));
            buildListArb(arbLinje);
            System.out.println("vareLinje list 3 "+arbLinje.get(i));
			i++;
        }
        Medarbejder medObj = new Medarbejder();
        medObj.setMedNr(Integer.parseInt(tbMedNr.getText()));
        loenObj = loenCtr.udregnLoen(medObj, fraDato, tilDato);

		//for at hente løn
		tbLoenSamletLoen.setText(Double.toString(loenObj.getSamletLoen()));
		//for at hente timer
		tbLoenSamletTimer.setText(Integer.toString(loenObj.getSamletTimer()));
    }//GEN-LAST:event_btnLoenHentArbejdsdageActionPerformed

    private void btnArbUdregnLoenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnArbUdregnLoenActionPerformed
        double arbloen = 100;
        double aften = 1.5;
        double weekend = 1.5;
        double sum;
        String testAft = "true";
        String testWek = "true";
        sum = arbloen * Double.parseDouble(tbArbTimer.getText());
        String aft = (String)ddArbAften.getSelectedItem();
        String wek = (String)ddArbWeekend.getSelectedItem();
        if(aft == testAft)
        {
            sum = sum * aften;
            tbArbLoen.setText(Double.toString(sum));
        }

        if (wek == testWek)
        {
            sum = sum * weekend;
            tbArbLoen.setText(Double.toString(sum));
        }
        
        else
        {
            tbArbLoen.setText(Double.toString(sum));
        }
    }//GEN-LAST:event_btnArbUdregnLoenActionPerformed

    private void tbBesMedNrActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbBesMedNrActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tbBesMedNrActionPerformed

    private void btnLoenGivLoenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoenGivLoenActionPerformed
        Loen loenObj = new Loen();
        Medarbejder medObj = new Medarbejder();
        String fraDato = (String)ddLoenFraDag.getSelectedItem() + '/' + (String)ddLoenFraMaaned.getSelectedItem() + '/' + (String)ddLoenFraAar.getSelectedItem();
        String tilDato = (String)ddLoenTilDag.getSelectedItem() + '/' + (String)ddLoenTilMaaned.getSelectedItem() + '/' + (String)ddLoenTilAar.getSelectedItem();

        loenObj.setLoenID(Integer.parseInt(tbLoenID.getText()));
        loenObj.setFraDato(fraDato);
        loenObj.setTilDato(tilDato);
        loenObj.setSamletLoen(Double.parseDouble(tbLoenSamletLoen.getText()));
        loenObj.setSamletTimer(Integer.parseInt(tbLoenSamletTimer.getText()));
        medObj.setMedNr(Integer.parseInt(tbMedNr.getText()));
        loenObj.setMedNr(medObj);
        loenCtr.opretLoen(loenObj);
    }//GEN-LAST:event_btnLoenGivLoenActionPerformed

    private void btnPrintKvitteringActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPrintKvitteringActionPerformed
        Medarbejder medObj = new Medarbejder();
        medObj.setMedNr(Integer.parseInt(tbBesMedNr.getText()));
        tbBesKvittering.setText(besCtr.printkvittering(Integer.parseInt(tbBesBestillingsNr.getText()), medObj));
    }//GEN-LAST:event_btnPrintKvitteringActionPerformed

    private void btnVarePrintMenukortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVarePrintMenukortActionPerformed
        tbVareMenuKort.setText(vareCtr.printMenukort());
    }//GEN-LAST:event_btnVarePrintMenukortActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GUIChef().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JList arbejdsdageList;
    private javax.swing.JButton btnArbUdregnLoen;
    private javax.swing.JButton btnFindBestilling;
    private javax.swing.JButton btnFindLevering;
    private javax.swing.JButton btnFindVare;
    private javax.swing.JButton btnFjernLevering;
    private javax.swing.JButton btnLoenGivLoen;
    private javax.swing.JButton btnLoenHentArbejdsdage;
    private javax.swing.JButton btnLoginRedigerLogin;
    private javax.swing.JButton btnLoginTilfoejLogin;
    private javax.swing.JButton btnMedFindMed;
    private javax.swing.JButton btnMedOpretMed;
    private javax.swing.JButton btnMedRedigerMed;
    private javax.swing.JButton btnMedSletMed;
    private javax.swing.JButton btnOpretBestilling;
    private javax.swing.JButton btnOpretLevering;
    private javax.swing.JButton btnOpretVare1;
    private javax.swing.JButton btnPrintKvittering;
    private javax.swing.JButton btnRedigerBestilling;
    private javax.swing.JButton btnRedigerLevering;
    private javax.swing.JButton btnRedigerVare;
    private javax.swing.JButton btnSletVare;
    private javax.swing.JButton btnTilfoejArbejdsdag;
    private javax.swing.JButton btnTilfoejVare;
    private javax.swing.JButton btnVarePrintMenukort;
    private javax.swing.JComboBox ddArbAar;
    private javax.swing.JComboBox ddArbAften;
    private javax.swing.JComboBox ddArbDag;
    private javax.swing.JComboBox ddArbMaaned;
    private javax.swing.JComboBox ddArbWeekend;
    private javax.swing.JComboBox ddBesStatus;
    private javax.swing.JComboBox ddLoenFraAar;
    private javax.swing.JComboBox ddLoenFraDag;
    private javax.swing.JComboBox ddLoenFraMaaned;
    private javax.swing.JComboBox ddLoenTilAar;
    private javax.swing.JComboBox ddLoenTilDag;
    private javax.swing.JComboBox ddLoenTilMaaned;
    private javax.swing.JComboBox ddLoginStilling;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField tbArbID;
    private javax.swing.JTextField tbArbLoen;
    private javax.swing.JTextField tbArbMedNr;
    private javax.swing.JTextField tbArbTimer;
    private javax.swing.JTextField tbBesAntal;
    private javax.swing.JTextField tbBesBestillingsNr;
    private javax.swing.JButton tbBesFjernVare;
    private javax.swing.JTextArea tbBesKommentar;
    private javax.swing.JTextArea tbBesKvittering;
    private javax.swing.JTextField tbBesMedNr;
    private javax.swing.JTextField tbBesPris;
    private javax.swing.JTextField tbBesVareID;
    private javax.swing.JTextField tbLevAdresse;
    private javax.swing.JTextField tbLevEfternavn;
    private javax.swing.JTextField tbLevFornavn;
    private javax.swing.JTextField tbLevTlf;
    private javax.swing.JTextField tbLoenID;
    private javax.swing.JTextField tbLoenSamletLoen;
    private javax.swing.JTextField tbLoenSamletTimer;
    private javax.swing.JTextField tbLoginBrugerID;
    private javax.swing.JTextField tbLoginBrugernavn;
    private javax.swing.JTextField tbLoginKode;
    private javax.swing.JTextField tbMedAdresse;
    private javax.swing.JTextField tbMedCpr;
    private javax.swing.JTextField tbMedEfternavn;
    private javax.swing.JTextField tbMedFornavn;
    private javax.swing.JTextField tbMedNr;
    private javax.swing.JTextField tbMedTlf;
    private javax.swing.JTextField tbVareBeskrivelse;
    private javax.swing.JTextField tbVareID;
    private javax.swing.JTextArea tbVareMenuKort;
    private javax.swing.JTextField tbVareNavn;
    private javax.swing.JTextField tbVarePris;
    private javax.swing.JList vareList;
    // End of variables declaration//GEN-END:variables

}
